//正则

//手机号验证
function checkPhone (s){
	var patrn=/^1[3|4|5|7|8][0-9]\d{8}$/;  
	if (!patrn.exec(s)) return false
	return true
}
//密码验证
function checkPw(s)  {  
	var patrn=/^[\w\.@#\!~`\,\\\/]{6,16}$/;  
	if (!patrn.exec(s)) return false
	return true
} 
//用户名验证
function checkUser(s){
    var re = /^[\u4E00-\u9FA5A-Za-z0-9]{4,16}$/;
    if(!re.test(s)) return false 
    return true      
}
//邮箱验证
function checkEmail(s){
	var re = /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
    if(!re.test(s)) return false
    return true    
}
//QQ验证
function checkQQ (s){
	var re =/^[1-9]\d{4,9}$/;
	if(!re.test(s)) return false 
    return true   
}
//验证码验证
function checkcode (s){
	var re =/^[0-9]\d{3}$/;
	if(!re.test(s)) return false 
    return true   
}
//价格正则
function isPrice(s) {  
    var re = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
    if(!re.test(s)) return false 
    return true  
}  
